<template>
  <div>
    <div>
      <h4>主表分数统计，根据分数显示描述信息</h4>
      <el-row type="flex" justify="space-between">
        <el-col>
          <span>F9.1 忧郁情绪</span>
          <div class="grid-content">
            <el-radio-group v-model="pgForm.useless3_radio1">
              <el-radio :label="0">无</el-radio>
              <el-radio :label="1">问到才说</el-radio>
              <el-radio :label="2">自发表达忧郁</el-radio>
              <el-radio :label="3">表情音调中流露</el-radio>
              <el-radio :label="4">言行极著</el-radio>
            </el-radio-group>
          </div>
        </el-col>
        <el-col :span="6">
          <div>
            <span>得分 </span>
            <el-input v-model="pgForm.useless3_input1" placeholder="" readonly style="width: 50%;"></el-input>
          </div>
        </el-col>

        <el-col>
          <span>F9.2 有罪感</span>
          <div class="grid-content">
            <el-radio-group v-model="pgForm.useless3_radio2">
              <el-radio :label="0">无</el-radio>
              <el-radio :label="1">贵备自己</el-radio>
              <el-radio :label="2">反复思考自己过失</el-radio>
              <el-radio :label="3">有罪恶妄想</el-radio>
              <el-radio :label="4">威胁幻觉</el-radio>
            </el-radio-group>
          </div>
        </el-col>
        <el-col>
          <div>
            <span>得分 </span>
            <el-input v-model="pgForm.useless3_input2" placeholder="" readonly style="width: 15%;"></el-input>
          </div>
        </el-col>
        <el-col :span="8">
          <div>
            <span>总分 </span>
            <el-input v-model="pgForm.useless3_input3" placeholder="" readonly style="width: 50%;"></el-input>
          </div>
        </el-col>
        <el-col :span="16">
          <div>
            <el-input v-model="pgForm.useless3_input4" placeholder=""></el-input>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  name: "useless3",
  title: "主表分数统计，根据分数显示描述信息",
  created() {
    if(this.istrans){
      this.pgForm=this.fromdata
    }
  },
  props: {
    fromdata:{},
    istrans:false,
  },
  data () {
    return {
      pgForm: {
        useless3_radio1: '',
        useless3_radio2: '',
        useless3_input1: '',
        useless3_input2: '',
        useless3_input3: '',
        useless3_input4: '',
      }
    };
  },
  watch: {
    radio1(val){
      this.input1 = val
    },
    radio2(val){
      this.input2 = val
    },
    sum(val){
      this.input3 = val
    }
  },
  computed: {
    sum(){
      return this.input1 + this.input2
    }
  }
}
</script>

<style scoped>
.el-row{
  margin: 10px 0;
  padding: 20px 20px;
  background-color: #f9f9f9;
  flex-wrap: wrap;
  flex-direction: row;
}
.el-col {
  margin:10px 0;
}

.el-radio-group{
  padding: 10px 20px;
}
.el-radio{
  display: block;
  margin-bottom: 15px;
}

</style>
